package colorChanger;

public class CMYKColor {

	private String color;

	private boolean veryWeak = false;
	private boolean weak = false;
	private boolean strong = false;
	private boolean veryStrong = false;
	private double colorIntensity = 0;
	public static final double VERY_WEAK = 0.0;
	public static final double WEAK = 0.25;
	public static final double STRONG = 0.50;
	public static final double VERY_STRONG = 0.75;
	public static final String CYAN = "cyan";
	public static final String MAGENTA = "magenta";
	public static final String YELLOW = "yellow";
	public static final String KEY = "key";
	
	public CMYKColor(double c2, String color) {
		setColor(color);
		colorIntensity = c2;
		setIntensity(c2);
	}

	public double getAbsoluteIntensity() {
		if (isVeryWeak()) {
			return VERY_WEAK;
		} else if (isWeak()) {
			return WEAK;
		} else if (isStrong()) {
			return STRONG;
		} else if (isVeryStrong()) {
			return VERY_STRONG;
		}
		return 0.0;
	}

	public double getIniticalColorIntensity() {
		return colorIntensity;
	}

	private void setIntensity(double colorIntensity) {
		if (colorIntensity >= VERY_STRONG) {
			setVeryStrong(true);
			setStrong(false);
			setWeak(false);
			setVeryWeak(false);
		} else if (colorIntensity >= STRONG) {
			setVeryStrong(false);
			setStrong(true);
			setWeak(false);
			setVeryWeak(false);
		} else if (colorIntensity >= WEAK) {
			setVeryStrong(false);
			setStrong(false);
			setWeak(true);
			setVeryWeak(false);
		} else if (colorIntensity >= VERY_WEAK) {
			setVeryStrong(false);
			setStrong(false);
			setWeak(false);
			setVeryWeak(true);
		}
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getColor() {
		return color;
	}

	public boolean isVeryWeak() {
		return veryWeak;
	}

	public void setVeryWeak(boolean veryWeak) {
		this.veryWeak = veryWeak;
	}

	public boolean isWeak() {
		return weak;
	}

	public void setWeak(boolean weak) {
		this.weak = weak;
	}

	public boolean isStrong() {
		return strong;
	}

	public void setStrong(boolean strong) {
		this.strong = strong;
	}

	public boolean isVeryStrong() {
		return veryStrong;
	}

	public void setVeryStrong(boolean veryStrong) {
		this.veryStrong = veryStrong;
	}

	public double getVERY_WEAK() {
		return VERY_WEAK;
	}

	public double getWEAK() {
		return WEAK;
	}

	public double getSTRONG() {
		return STRONG;
	}

	public double getVERY_STRONG() {
		return VERY_STRONG;
	}

}
